import { v4 as uuidv4 } from 'uuid'
import type { LoginInfo, TtwzLoginInfo } from '@/types'

export const getToken = (loginInfo: LoginInfo): Promise<TtwzLoginInfo> => {
  return new Promise((resolve) => {
    setTimeout(() => {
      resolve({
        ...loginInfo,
        token: uuidv4(),
      })
    }, 500)
  })
}
